SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW [dbo].[PD]
          AS  SELECT   DrugId ,
                        SUM(Quantity) AS PQuantity ,
                        ExpDate ,
                        BatchLot
               FROM     dbo.PrescriptionDetail
               GROUP BY DrugId ,
                        ExpDate ,
                        BatchLot
             
GO
